import request from '@/utils/request'

export default {
  //获取全部用户
  getAllUser(current,size){
    return request({
      url: `/novelLogin/sirius-user/getAllUser/${current}/${size}`,
      method: 'get'
    })
  },
  //根据id删除用户
  deleteUser(id,num){
    return request({
      url: `novelLogin/sirius-user/deleteUser/${id}/${num}`,
      method: 'delete'
    })
  },
  //根据id获取用户
  getUserById(id){
    return request({
      url: `novelLogin/sirius-user/getUserById/${id}`,
      method: 'get'
    })
  },
  //添加用户
  addUser(user){
    return request({
      url: `novelLogin/sirius-user/addUser`,
      method: 'post',
      data: user
    })
  },
  updateUser(user){
    return request({
      url: `novelLogin/sirius-user/updateUser`,
      method: 'post',
      data: user
    })
  }
}
